<a href="#" class="square">
  <div class="burgerwrap">
    <span></span>
    <span></span>
    <span></span>
  </div>
</a>

<style>
/* From Uiverse.io by elijahgummer  - Tags: simple, gradient, switch, glow, modern, hover effect */
.square {
  border: 1px solid #5e42a6;
  height: 26px;
  width: 26px;
  display: block;
  margin: 40px auto;
  transform: rotate(45deg);
  overflow: hidden;
  cursor: pointer;
  -webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  -moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  -o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  /* custom */
}

.square .burgerwrap {
  height: 18px;
  width: 21px;
  transform: rotate(-45deg);
  padding-left: 2px;
  padding-top: 8px;
  -webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  -moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  -o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  /* custom */
}

.square:hover {
  transform: rotate(135deg);
  border: 1px solid #fff;
  box-shadow: 0 0 2px rgba(255, 255, 255, 0.5), 0 0 5px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 255, 255, 0.5), 0 0 30px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 255, 255, 0.5), 0 0 50px rgba(255, 255, 255, 0.5),
    0 0 60px rgba(255, 255, 255, 0.5);
}

.square:hover .burgerwrap {
  transform: rotate(-135deg);
}

.square span {
  height: 2px;
  width: 14px;
  background: linear-gradient(145deg, #5e42a6, #b46be4);
  display: block;
  margin-bottom: 2px;
  -webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  -moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  -o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  /* custom */
}

.square span:after {
  content: "";
  height: 2px;
  width: 14px;
  position: absolute;
  background: #fff;
  left: -22px;
  margin-top: -4px;
  -webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  -moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  -o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
  /* custom */
}

.square:hover span {
  margin-left: 26px;
}

.square:hover span:after {
  left: 0.2px;
}

.square span:nth-of-type(1),
.square span:nth-of-type(1):after {
  transition-delay: 0.1s;
}

.square span:nth-of-type(2),
.square span:nth-of-type(2):after {
  transition-delay: 0.2s;
}

.square span:nth-of-type(3),
.square span:nth-of-type(3):after {
  transition-delay: 0.3s;
}

</style>
    